In the field of data communication, there are several known protocols for point-to-point or point-to-multipoint communication. One simple protocol suitable for low cost applications such as low speed terminal interfaces is an asynchronous protocol based on start- and stop-bit recognition and transmitted on standard RS-232 interfaces. One important consideration in the selection of a communication protocol is its ability to perform error detection and correction. Error detection is usually performed in the asynchronous start-stop protocol by appending a parity bit to the end of a transmitted data character. A transmitting station counts the number of binary ones in the character. In a system with even parity, if the number of binary ones in the character is odd, the parity bit is set to a binary one to make the total number even. In a system with odd parity, if the number of binary ones in the character is even, the parity bit is set to a binary one to make the total number odd. On receipt of the character and the parity bit, a receiving station then adds the total number of binary ones to determine whether the parity is correct. If an even number of ones is detected for a character in a data communication system with odd parity, the receiving station can then infer that an error during transmission. In most communication systems, a noise burst typically lasts long enough to cause several bits to be received erroneously. If the noise burst occurs in such a way as to maintain either an even or an odd number of binary ones during the noise burst, then the receiving station will fail to detect the error. Thus, the noise characteristics of communication systems decreases the usefulness of error detection using parity.
Another important consideration is the ability to transfer data unrestricted, a characteristic known as transparency. In order to set up, maintain, and terminate a communication link, transmitting and receiving stations recognize predetermined characters known as control characters. However, transparency requires that the data transmitted by one station is the same data received by another station. Some characters of data may be identical to the control characters. However, the communication protocol must recognize the character as data, and not as a control character. There are two major methods of solving the transparency problem.
The first method is based on transmitting control characters within the data stream. For example, high speed data link control (HDLC) protocol uses a zero insertion and deletion procedure to provide control character recognition. In HDLC protocol, a control character known as a "flag" includes a binary zero, followed by six binary ones, followed by another binary zero. A transparency problem may arise if a data character has the same pattern of binary ones and zeros. A transmitting station with such a character to send, however, inserts a binary zero after the fifth binary one. In general, the transmitting station inserts a binary zero after any sequence of five binary ones to transmit. The receiving station deletes a binary zero which occurs after any five consecutive binary ones. By following such a convention, the receiving station can thus determine a true flag control character by recognizing a sixth consecutive binary one.
If a transmitter exception occurs, requiring the frame transmission to be aborted, the transmitter sends a special character to signal the receiving station that the exception has occurred and the frame transmission has been aborted. In HDLC protocol, the character is known as an "ABORT" character. In binary synchronous (BISYNC) protocol, a character known as data link escape or "DLE" is sent. Thus protocols using the first method ensure data transparency and correctly interpret the data stream by complicated procedures.
The second method solves the transparency problem without zero insertion and deletion in the data stream, by keeping track of the character count. A data packet includes a fixed length header field, followed by data characters which form an information field, and is usually terminated by a frame check sequence. The header provides control information, and includes a character count field which specifies the number of characters in the information field. The principal advantage of protocols using the character count method is simplicity in ensuring data transparency. A widely-used protocol that applies the byte count method is digital data communication message protocol (DDCMP).
For higher speed applications protocols such as HDLC and DDCMP are more useful than the asynchronous start-stop protocol. FIG. 1 illustrates a timing diagram of a DDCMP data frame 100 known in the prior art. The DDCMP frame format is well-known and is described in detail in McNamara, John, Technical Aspects of Data Communication, 3d ed., Digital Press, Bedford, Mass., 1988. FIG. 1 depicts bit fields of the DDCMP frame along a time dimension in the horizontal direction, with the bit fields being received or transmitted sequentially from left to right. Before the start of the frame at a time labelled "t0", the transmitting station sends two synchronization characters 101 and 102 to alert the receiving station of the occurrence of the frame. Between time t0 and a time labelled "t1", the station transmits a portion of the frame known as a header. Between time t1 and a time labelled "t2", the station transmits a cyclic redundancy check sequence known as "CRC1" 109. Between time t2 and a time labelled "t3", the station transmits an information field 110, which has up to 16,383 8-bit characters. Between time t3 and a time labelled "t4" the station transmits a cyclic redundancy check sequence known as "CRC2" 111.
The header field has several subfields 103 including an 8-bit CLASS subfield, a 14-bit COUNT subfield 104 a 2-bit FLAG subfield 8-bit RESPONSE, SEQUENCE, and ADDRESS subfields 106, 107 and 108, respectively. The use of the various subfields in the header field are well known, but COUNT subfield 104 is especially important. In the DDCMP protocol, which is a byte-count protocol, COUNT subfield 104 specifies the number of information bytes to be sent. COUNT subfield 104 allows the receiving station to determine when CRC2 field 111, following information field 110 is expected. CRC2 field 111 helps to determine whether an error occurred during transmission of the information portion of the message. In the DDCMP protocol, CRC1 field 109 and CRC2 field 111 are conventional CRC-16 cyclic redundancy checks performed on their respective fields. Cyclic redundancy checks are used in many higher performance protocols because they ensure a very low probability that a noise burst on a stream of transmitted data will not be detected by a receiving station.
Integrated circuit devices which implement various protocols and perform error detection are commercially available. Devices known as UARTs, which implement the asynchronous start-stop protocol, have long been commercially available. Integrated circuit devices that perform such protocols as HDLC, DDCMP, and binary synchronous (BISYNC) protocols are relatively newer. Several commercial integrated circuit devices include multiple protocol communication channels. For example, one type of programmable communication channel commonly known as a serial communication controller (SCC) may be programmed to implement a variety of communication protocols, such as the asynchronous start-stop protocol, HDLC, DDCMP, and binary synchronous protocol (BISYNC).
A communication station or node may be formed by combining an SCC with a data processor to program the SCC and a memory to store the program. One or more SCCs may also be combined with the data processor and peripherals to provide a communication station on a single integrated circuit. See the Motorola Inc. MC68302 Integrated Multi-Protocol Processor User's Manual, MC68302UM/AD, 1989. The data processor must program the SCC in a manner prescribed by the communication protocol being operated. In addition, the data processor must provide the data to transmit, and store and process received data. If the data processor fails to provide data to the SCC quickly enough during transmission, an exception known as a transmitter underrun occurs. The SCC must be able to respond to the transmitter exception in a way that ensures reliable operation of the protocol. During DDCMP mode of operation, if an exception occurs during transmission, the SCC must ensure that the appropriate field, CRC1 or CRC2, is incorrect to ensure that the receiving station will see the frame as erroneous and discard it. However, as communication functions performed by different devices in a data processing system change, new ways of performing protocols which deal with errors encountered in the data processing system must be developed.